<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:cc="http://java.sun.com/jsf/composite"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:f="http://java.sun.com/jsf/core">

    <!-- INTERFACE -->
    <cc:interface>
        <cc:attribute name="admission" />

    </cc:interface>

    <!-- IMPLEMENTATION -->
    <cc:implementation>
        <h:form>

            <p:commandButton value="Print" styleClass="noPrintButton" ajax="false" action="#" >
                <p:printer target="gpBillPreview" ></p:printer>
            </p:commandButton>

            <h:outputStylesheet library="css" name="printing_bht.css"></h:outputStylesheet>

            <div>
                <h:panelGroup id="gpBillPreview" >

                    <div class="fiveinchbill" >

                        <div class="headingTitle" >
                            <p:outputLabel   value="INDOOR PATIENT DEPARTMENT" />
                        </div>

                        <div class="cel1R1L" style="margin-top: 6%;">
                            <p:outputLabel   value="Admission Type : " />
                            <p:outputLabel  value="#{cc.attrs.admission.admissionType.name}" />
                        </div> 

                        <div class="cel2R1L" style="margin-top: 6%;">
                            <p:outputLabel   value="Room : " />
                            <p:outputLabel  value="#{cc.attrs.admission.currentPatientRoom.roomFacilityCharge.name}" />
                        </div>

                        <div class="cel1R1L" style="margin-top: 10%;">
                            <p:outputLabel   value="BHT NO : " />
                            <p:outputLabel  value="#{cc.attrs.admission.bhtNo}" />
                        </div>

                        <div class="cel2R1L" style="margin-top: 10%;">
                            <h:outputLabel value="Date of Admission : ">
                            </h:outputLabel>

                            <h:outputLabel value="#{cc.attrs.admission.dateOfAdmission}" >
                                <f:convertDateTime pattern="dd/MM/yy"/>
                            </h:outputLabel>
                        </div>

                        <div class="cel1R1L" style="margin-top: 14%;">
                            <h:outputLabel value="Payment Type : ">
                            </h:outputLabel>

                            <h:outputLabel value="#{cc.attrs.admission.paymentMethod}" >
                            </h:outputLabel>
                        </div>

                        <div class="cel2R1L" style="margin-top: 14%;">
                            <h:outputLabel value="Time of Admission : ">
                            </h:outputLabel>

                            <h:outputLabel value="#{cc.attrs.admission.dateOfAdmission}" >
                                <f:convertDateTime pattern="hh mm a"/>
                            </h:outputLabel>
                        </div>

                        <div style="position: absolute;
                             text-align: center;
                             text-decoration: underline;
                             font-weight: bold;
                             font-size: 100%;
                             margin-top: 18%;
                             margin-left: 25%;" >
                            <p:outputLabel   value="PATIENT DETAIL" />
                        </div>


                        <div class="cel1R1L" style="margin-top: 22%;max-width: 300px;">
                            <p:outputLabel   value="Name :" />
                            <p:outputLabel  value="#{cc.attrs.admission.patient.person.nameWithTitle}" />

                        </div>
                        
                        <div class="cel2R1L" style="margin-top: 22%;">
                            <h:outputLabel value="Sex : ">
                            </h:outputLabel>

                            <h:outputLabel value="#{cc.attrs.admission.patient.person.sex}" >

                            </h:outputLabel>
                        </div>

                        <div class="cel1R1L" style="margin-top: 29%;">
                            <h:outputLabel value="Address : ">
                            </h:outputLabel>

                            <h:outputLabel value="#{cc.attrs.admission.patient.person.address}" >

                            </h:outputLabel>
                        </div>
                        
                        <div class="cel2R1L" style="margin-top: 29%;">
                            <h:outputLabel value="NIC : ">
                            </h:outputLabel>

                            <h:outputLabel value="#{cc.attrs.admission.patient.person.nic}" >

                            </h:outputLabel>
                        </div>

                        <div class="cel1R1L" style="margin-top: 32%;">
                            <h:outputLabel value="Age : ">
                            </h:outputLabel>

                            <h:outputLabel value="#{cc.attrs.admission.patient.age}" >

                            </h:outputLabel>
                        </div>

                        <div class="cel2R1L" style="margin-top: 32%;">
                            <h:outputLabel value="Home No : ">
                            </h:outputLabel>

                            <h:outputLabel value="#{cc.attrs.admission.patient.person.phone}" >

                            </h:outputLabel>
                        </div>

                        <div class="cel1R1L" style="margin-top: 36%;">
                            <h:outputLabel value="Mobile No : ">
                            </h:outputLabel>

                            <h:outputLabel value="#{cc.attrs.admission.patient.person.mobile}" >

                            </h:outputLabel>
                        </div>
                        
                        <div class="cel2R1L" style="margin-top: 36%;">
                            <h:outputLabel value="Refering Doctor : ">
                            </h:outputLabel>

                            <h:outputLabel value="#{cc.attrs.admission.referringDoctor.person.name}" >

                            </h:outputLabel>
                        </div>
                        
                        <div style="position: absolute;
                             text-align: center;
                             text-decoration: underline;
                             font-weight: bold;
                             font-size: 100%;
                             margin-top: 40%;
                             margin-left: 25%;" >
                            <p:outputLabel   value="GUARDIAN DETAIL" />
                        </div>

                        <div class="cel1R1L" style="margin-top: 44%;">
                            <h:outputLabel value="Name : ">
                            </h:outputLabel>

                            <h:outputLabel value="#{cc.attrs.admission.guardian.name}" >
                                <f:convertDateTime pattern="dd/MM/yy"/>
                            </h:outputLabel>
                        </div>
                        
                        <div class="cel2R1L" style="margin-top: 44%;">
                            <h:outputLabel value="NIC : ">
                            </h:outputLabel>

                            <h:outputLabel value="#{cc.attrs.admission.guardian.nic}" >
                            </h:outputLabel>
                        </div>
                        
                        <div class="cel1R1L" style="margin-top: 48%;">
                            <h:outputLabel value="Address : ">
                            </h:outputLabel>

                            <h:outputLabel value="#{cc.attrs.admission.guardian.address}" >
                                <f:convertDateTime pattern="dd/MM/yy"/>
                            </h:outputLabel>
                        </div>
                        
                        <div class="cel2R1L" style="margin-top: 48%;">
                            <h:outputLabel value="Home No : ">
                            </h:outputLabel>

                            <h:outputLabel value="#{cc.attrs.admission.guardian.phone}" >
                            </h:outputLabel>
                        </div>

                        <div class="cel1R1L" style="margin-top: 52%;">
                            <h:outputLabel value="Mobile No : ">
                            </h:outputLabel>

                            <h:outputLabel value="#{cc.attrs.admission.guardian.mobile}" >
                                <f:convertDateTime pattern="dd/MM/yy"/>
                            </h:outputLabel>
                        </div>
                        
                        <div style="position: absolute;
                             text-align: center;
                             text-decoration: underline;
                             font-weight: bold;
                             font-size: 100%;
                             margin-top: 56%;
                             margin-left: 25%;" >
                            <p:outputLabel   value="CREDIT COMPANY DETAIL" />
                        </div>

                        <div class="cel1R1L" style="margin-top: 60%;">
                            <h:outputLabel value="Credit Company : ">
                            </h:outputLabel>

                            <h:outputLabel value="#{cc.attrs.admission.creditCompany.name}" >
                            </h:outputLabel>
                        </div>
                        
                        <div class="cel2R1L" style="margin-top: 60%;">
                            <h:outputLabel value="Policy Number : ">
                            </h:outputLabel>

                            <h:outputLabel value="#{cc.attrs.admission.policyNo}" >
                            </h:outputLabel>
                            
                        </div>
                        
                        <div class="cel1R1L" style="margin-top: 64%;">
                            <h:outputLabel value="Reference Number : ">
                            </h:outputLabel>

                            <h:outputLabel value="#{cc.attrs.admission.referanceNo}" >
                            </h:outputLabel>
                        </div>
                        
                        <div class="cel1R1L" style="margin-top: 82%; font-weight: bold; font-size: 14px!important;">
                            <p>
                                I agree to Abide by the terms and conditions of admission prevailing 
                                at this hospital and hold myself responsible for payment of all bills of 
                                this patient before discharge from this hospital.
                            </p>
                        </div>
                        
                        <div class="cel2R1L" style="margin-top: 100%;">
                            <h:outputLabel value="Guardian" style="text-decoration: overline;">
                            </h:outputLabel>
                        </div>

                        <div class="cel1R1L" style="margin-top: 100%;">
                            <h:outputLabel value="Cashier : #{cc.attrs.admission.creater.code}" style="text-decoration: overline;">
                            </h:outputLabel>
                        </div>
                        <!--                        <div class="BillDate">
                                                    <h:outputLabel value="Payment Methord : ">
                                                    </h:outputLabel>
                        
                                                    <h:outputLabel value="#{cc.attrs.admission.paymentMethod}" >
                                                        
                                                    </h:outputLabel>
                                                </div>
                                                
                                                <div class="BillDate">
                                                    <h:outputLabel value="Referring Doctor : ">
                                                    </h:outputLabel>
                        
                                                    <h:outputLabel value="#{cc.attrs.admission.referringDoctor.person.nameWithTitle}" >
                                                        
                                                    </h:outputLabel>
                                                </div>
                                                
                                                <div class="BillDate">
                                                    <h:outputLabel value="OPD Doctor : ">
                                                    </h:outputLabel>
                        
                                                    <h:outputLabel value="#{cc.attrs.admission.opdDoctor.person.nameWithTitle}" >
                                                        
                                                    </h:outputLabel>
                                                </div>-->

                    </div>
                </h:panelGroup>
            </div>

        </h:form>

    </cc:implementation>
</html>
